Make xfree gdkinput code compile
authorAlexander Larsson <alexl@redhat.com>
Fri, 16 Jan 2009 12:52:16 +0000 (13:52 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:18 +0000 (10:15 +0200)
gdk/x11/gdkinput-x11.c

index 8faf7048459c1f20fc672bbfe82a81c8ac707e5b..9e2d81889fad911e868bc5c9e5a061bc4735b6b3 100644 (file)
@@ -416,15 +416,15 @@ gdk_input_translate_coordinates (GdkDevicePrivate *gdkdev,
                                 gdouble          *x_out,
                                 gdouble          *y_out)
 {
-  GdkWindowImplX11 *impl;
+  GdkWindowObject *window_private;
   int i;
   int x_axis = 0;
   int y_axis = 0;
 
   double device_width, device_height;
   double x_offset, y_offset, x_scale, y_scale;
-
-  impl = GDK_WINDOW_IMPL_X11 (((GdkWindowObject *) input_window->window)->impl);
+  
+  window_private = (GdkWindowObject *) input_window->window;
 
   for (i=0; i<gdkdev->info.num_axes; i++)
     {
@@ -476,26 +476,26 @@ gdk_input_translate_coordinates (GdkDevicePrivate *gdkdev,
        }
       device_aspect = (device_height*y_resolution) /
         (device_width*x_resolution);
-      if (device_aspect * impl->width >= impl->height)
+      if (device_aspect * window_private->width >= window_private->height)
        {
          /* device taller than window */
-         x_scale = impl->width / device_width;
+         x_scale = window_private->width / device_width;
          y_scale = (x_scale * x_resolution)
            / y_resolution;
 
          x_offset = 0;
          y_offset = -(device_height * y_scale - 
-                              impl->height)/2;
+                      window_private->height)/2;
        }
       else
        {
          /* window taller than device */
-         y_scale = impl->height / device_height;
+         y_scale = window_private->height / device_height;
          x_scale = (y_scale * y_resolution)
            / x_resolution;
 
          y_offset = 0;
-         x_offset = - (device_width * x_scale - impl->width)/2;
+         x_offset = - (device_width * x_scale - window_private->width)/2;
        }
     }